# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=perl-net-frame
_pkgname=Net-Frame
pkgver=1.21
pkgrel=7
pkgdesc='The base framework for frame crafting.'
arch=('any')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl-bit-vector>=0' 'perl-class-gomor>=1.00' 'perl-net-ipv6addr>=0'
         'perl-socket6>=0')
url='https://metacpan.org/release/Net-Frame'
source=("http://search.cpan.org/CPAN/authors/id/G/GO/GOMOR/$_pkgname-$pkgver.tar.gz")
sha512sums=('a0c8a8a7825bd82b5ef7bcb1872a53b38199adcc601fbf7a16653f57923659fd46454539b616a1aacb17a175363c005a88ef2948f41cecf32d6edbf46cdcca4f')

prepare() {
  cd "$_pkgname-$pkgver"

  export PERL_MM_USE_DEFAULT=1 PERL5LIB="" \
    PERL_AUTOINSTALL=--skipdeps \
    PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'" \
    PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
    MODULEBUILDRC=/dev/null

  /usr/bin/perl Makefile.PL
}

build() {
  cd "$_pkgname-$pkgver"

  make
}

package() {
  cd "$_pkgname-$pkgver"

  make DESTDIR="$pkgdir" install

  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
}

